package com.tbsoft.trail.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.transaction.annotation.Transactional;

import com.tbsoft.trail.model.MergedOrder;
/**
 * @desc 采购单保存Dao
 * @author lizhenhua
 *
 */
@Transactional
public class MergedOrderDao {
	private SessionFactory sessionFactory;

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	public Session getCurrentSession() {
		return getSessionFactory().getCurrentSession();
	}
	/**
	 * @desc 采购单保存Ｄａｏ
	 * @param order
	 * @return
	 */
	public Integer saveOrder(MergedOrder order) {
		return (Integer) getCurrentSession().save(order);
	}

	
}
